package lq;

import java.util.Scanner;

public class lq2010 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n,m,x,i,gw,sw,bw,y;
        while (in.hasNext()){
            gw=0;
            sw=0;
            bw=0;
            y=0;
            n=in.nextInt();
            m=in.nextInt();
            if (n>m){
                x=n;
                n=m;
                m=x;
            }
            for (i=n;i<=m;i++){
                bw=i/100;
                sw=i/10%10;
                gw=i%10;
                if (bw*bw*bw+sw*sw*sw+gw*gw*gw==i){
                    if (y!=0){
                        System.out.print(" "+i);
                    }
                    else {
                        System.out.print(i);
                    }
                    y++;
                }
            }
            if (y==0){
                System.out.print("no");
            }
            System.out.println();
        }
    }

}
